<?php
 Session_Start () ;
 Include ($_SESSION ["repertoire_config"]."/garennes.cfg") ;
 Include ($_SESSION ["repertoire_config"]."/init.php") ;
 Include ($_SESSION ["repertoire_config"]."/module_vie_scolaire.php") ;
 Include ("../include/config.inc") ;
 verif_droits ($droit_courant, $_SESSION ["code"]) ;
 $id_utilisateur = utilparcode ($_SESSION ["code"]) ;
 
 Include ("../../include/var_temp.inc") ;

 $titre = "Liste de classe" ;
 $titre_affichage = "Liste de <FONT COLOR='#0000FF'>classe</FONT>" ;
 $choix = "liste_classes_".$id_utilisateur ;
 $page = "./vs_affiche_liste_classe.php" ;
 $type = 1 ;
 
 $resultats = SQL_commande ("SELECT * FROM menus WHERE numero='".$droit_courant."' AND ordre='0'", $id_sql) ;
 $l = SQL_tableau_associatif ($resultats, "") ;
 Echo "<HTML>" ;
 Echo "<HEAD>" ;
 entete_html ("Garennes", "", 1) ;
 Echo styles ("none", "none", "none", $l ["nom"], "none") ;
 Echo "</HEAD>" ;
 Echo "<BODY BACKGROUND=\"../images/fond.png\" TEXT=\"".$theme [0][4]."\" onContextMenu=\"return false\">" ;
 Echo affiche_travail ("travail_menu", "<FONT SIZE='+1'><B>".$titre_affichage."</B></FONT>", $l ["couleur_fond"]) ;
 Echo "<BR>" ;
 
 Echo "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" ALIGN=\"CENTER\">" ;
 Echo "<TR>" ;
 Echo "<TD>" ;

 $param = recup_parametrage ($choix) ;
 Echo "<FORM ACTION=\"".$page."\" METHOD=\"POST\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"type\" VALUE=\"".$type."\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"choix\" VALUE=\"".$choix."\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"titre\" VALUE=\"".$titre."\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"jour\" VALUE=\"".Date ("j")."\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"mois\" VALUE=\"".Date ("m")."\">\n" ;
 Echo "<INPUT TYPE=\"HIDDEN\" NAME=\"annee\" VALUE=\"".Date ("Y")."\">\n" ;
 Echo "<TABLE BORDER=\"1\" BGCOLOR=\"".$l ["couleur_fond"]."\" CELLSPACING=\"0\" CELLPADDING=\"0\" ALIGN=\"CENTER\" STYLE=\"border:1px solid #000000;border-collapse:collapse\">" ;
 Echo "<TR>\n" ;
 Echo "<TD>\n" ;
 Echo "<TABLE BORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" ALIGN=\"CENTER\">\n" ;
 Echo "<TR><TD COLSPAN=\"3\">&nbsp;</TD></TR>\n" ;
 
 Echo "<TR>\n" ;
 Echo "<TD ALIGN=\"RIGHT\">&nbsp;<B>Classe</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "<TD ALIGN=\"LEFT\" COLSPAN=\"2\">\n" ;
 Echo "<SELECT NAME=\"classe\">\n" ;
 $resultats = SQL_commande ("SELECT id_classe,nom,nom_bref FROM classes ORDER BY nom_bref", $id_sql) ;
 For ($i = 0 ; $i < SQL_nbr_lignes ($resultats) ; $i++)
  {
   $ligne = SQL_tableau_associatif ($resultats, "") ;
   Echo "<OPTION VALUE=\"".$ligne ["id_classe"]."\"" ;
   If ($ligne ["id_classe"] == $param ["classe"][0]) { Echo " SELECTED" ; }
   Echo ">".$ligne ["nom_bref"]."-".$ligne ["nom"]."</OPTION>\n" ;
  }
 Echo "</SELECT>&nbsp;\n" ;
 Echo "</TD>\n" ;
 Echo "</TR>\n" ;
 Echo "<TR><TD COLSPAN=\"3\">&nbsp;</TD></TR>\n" ;
 
 Echo "<TR>\n" ;
 Echo "<TD ALIGN=\"RIGHT\" vALIGN=\"TOP\">&nbsp;<B>Afficher</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "<TD ALIGN=\"LEFT\" vALIGN=\"MIDDLE\">\n" ;
 $resultats = SQL_commande ("SELECT * FROM vs_types_autorisations ORDER BY nom", $id_sql) ;
 For ($i = 0 ; $i < SQL_nbr_lignes ($resultats) ; $i++)
  {
   $ligne = SQL_tableau_associatif ($resultats, "") ;
   Echo "<INPUT TYPE=\"CHECKBOX\" NAME=\"autorisation_".$ligne ["id_type_autorisation"]."\"" ;
   If ($param ["autorisation"][$ligne ["id_type_autorisation"]] == 1) { Echo " CHECKED" ; }
   Echo ">".$ligne ["nom"] ;
   If ($i < SQL_nbr_lignes ($resultats)-1) { Echo "<BR>\n" ; } Else { Echo "\n" ; }
  }
 Echo "</TD>\n" ;
 Echo "<TD ALIGN=\"LEFT\" vALIGN=\"MIDDLE\">\n" ;
 For ($i = 0 ; $i < SQL_nbr_lignes ($resultats) ; $i++)
  {  
   Echo "&nbsp;&nbsp;&nbsp;&nbsp;<INPUT TYPE=\"CHECKBOX\" NAME=\"inverse_".$i."\"" ;
   If ($param ["inverse"][$i] == 1) { Echo " CHECKED" ; }
   Echo ">&nbsp;<FONT SIZE=\"-1\">Autorisation&nbsp;inverse</FONT>&nbsp;&nbsp;&nbsp;<BR>\n" ;
  }
 Echo "</TD>\n" ;
 Echo "</TR>\n" ;
 
 Echo "<TR><TD COLSPAN=\"3\">&nbsp;</TD></TR>\n" ;
 
 Echo "</TABLE>\n" ;
 Echo "</TD>\n" ;
 Echo "</TR>\n" ;
 Echo "</TABLE>\n" ;
 Echo "</TD>\n" ;
 
 Echo "<TD>&nbsp;&nbsp;</TD>\n" ;
 
 affiche_parametres_formatage () ;
 
 /*
 Echo "     <TD vALIGN=BOTTOM ALIGN=CENTER>\n" ;
 Echo "      <B>Param&egrave;tres&nbsp;d'affichage&nbsp;\n" ;
 Echo "      <TABLE BORDER=1 BGCOLOR=\"#FFCC99\" CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n" ;
 Echo "       <TR>\n" ;
 Echo "        <TD>\n" ;
 Echo "         <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 ALIGN=CENTER>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 Echo "          <TR>\n" ;
 Echo "           <TD ALIGN=RIGHT>&nbsp;<B>Taille&nbsp;fonte&nbsp;titre</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "           <TD ALIGN=LEFT>\n" ;
 Echo "            <SELECT NAME=taille_fonte_titre>\n" ;
 For ($i = 16 ; $i < 36 ; $i=$i+2)
  {
   Echo "              <OPTION VALUE=\"".$i."\"" ;
   If ($i == $taille_fonte_titre) { Echo " SELECTED" ; }
   Echo ">".$i."</OPTION>\n" ;
  }
 Echo "            </SELECT>&nbsp;" ;
 Echo "           </TD>\n" ;
 Echo "          </TR>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 
 Echo "          <TR>\n" ;
 Echo "           <TD ALIGN=RIGHT>&nbsp;<B>Taille&nbsp;fonte&nbsp;date</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "           <TD ALIGN=LEFT>\n" ;
 Echo "            <SELECT NAME=taille_fonte_date>\n" ;
 For ($i = 10 ; $i < 16 ; $i=$i+2)
  {
   Echo "              <OPTION VALUE=\"".$i."\"" ;
   If ($i == $taille_fonte_date) { Echo " SELECTED" ; }
   Echo ">".$i."</OPTION>\n" ;
  }
 Echo "            </SELECT>&nbsp;" ;
 Echo "           </TD>\n" ;
 Echo "          </TR>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 
 Echo "          <TR>\n" ;
 Echo "           <TD ALIGN=RIGHT>&nbsp;<B>Taille&nbsp;fonte&nbsp;ent&ecirc;tes</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "           <TD ALIGN=LEFT>\n" ;
 Echo "            <SELECT NAME=taille_fonte_entete>\n" ;
 For ($i = 9 ; $i < 13 ; $i++)
  {
   Echo "              <OPTION VALUE=\"".$i."\"" ;
   If ($i == $taille_fonte_entete) { Echo " SELECTED" ; }
   Echo ">".$i."</OPTION>\n" ;
  }
 Echo "            </SELECT>&nbsp;" ;
 Echo "           </TD>\n" ;
 Echo "          </TR>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 
 Echo "          <TR>\n" ;
 Echo "           <TD ALIGN=RIGHT>&nbsp;<B>Taille&nbsp;fonte&nbsp;cellules</B>&nbsp;:&nbsp;</TD>\n" ;
 Echo "           <TD ALIGN=LEFT>\n" ;
 Echo "            <SELECT NAME=taille_fonte_cellules>\n" ;
 For ($i = 7 ; $i < 12 ; $i++)
  {
   Echo "              <OPTION VALUE=\"".$i."\"" ;
   If ($i == $taille_fonte_cellules) { Echo " SELECTED" ; }
   Echo ">".$i."</OPTION>\n" ;
  }
 Echo "            </SELECT>&nbsp;" ;
 Echo "           </TD>\n" ;
 Echo "          </TR>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 
 Echo "          <TR>\n" ;
 Echo "           <TD ALIGN=RIGHT><INPUT TYPE=CHECKBOX NAME=numerotation_lignes" ;
 If ($numerotation_lignes == 1) { Echo " CHECKED" ; }
 Echo "></TD>\n" ;
 Echo "           <TD ALIGN=LEFT>&nbsp;<B>Num&eacute;rotation</B>&nbsp;</TD>\n" ;
 Echo "          </TR>\n" ;
 Echo "          <TR><TD COLSPAN=2>&nbsp;</TD></TR>\n" ;
 
 Echo "         </TABLE>\n" ;
 Echo "        </TD>\n" ;
 */
 Echo "</TR>\n" ;
 Echo "</TABLE>\n" ;
 Echo "</TD>\n" ;
 Echo "</TR>\n" ;
 Echo "<TR><TD COLSPAN=3>&nbsp;</TD></TR>\n" ;
 Echo "<TR>\n" ;
 Echo "<TD ALIGN=CENTER COLSPAN=3><INPUT TYPE=\"IMAGE\" SRC=\"../images/valider.png\" NAME=\"requete\" VALUE=\"VaLiDeR\"></TD>\n" ;
 Echo "</TR>\n" ;
 Echo "</FORM>\n" ;
 Echo "</TABLE>" ;
 Echo "</BODY></HTML>" ;
?>